package com.zhijian.medical.service;


import com.zhijian.medical.entity.po.AssessmentStudy;
import com.zhijian.medical.entity.vo.request.AssessmentStudySearchVo;
import com.zhijian.medical.entity.vo.response.AssessmentListVo;
import com.zhijian.medical.entity.vo.response.AssessmentStudyVo;
import com.zhijian.medical.util.Page;

import java.util.List;

/**
 * 考核-学习关系表 业务处理层
 *
 * @author HCG
 * @version 1.0
 * @date 2023-02-17 10:54:39
 */
public interface AssessmentStudyService {

    /**
     * 主键查询
     *
     * @param id
     * @return
     */
    AssessmentStudy selectById(Long id);

    /**
     * 主键查询vo
     *
     * @param id
     * @return
     */
    AssessmentStudyVo selectVoById(Long id);

    /**
     * 按照主键删除
     *
     * @param id
     */
    void deleteById(Long id);

    /**
     * 根据考核id进行删除
     *
     * @param assessmentId
     */
    void deleteByAssessmentId(Long assessmentId);

    /**
     * 根据学习模块id进行删除
     *
     * @param studyId
     */
    void deleteByStudyId(Long studyId);

    /**
     * 新增
     *
     * @param assessmentStudy
     * @return
     */
    Long insert(AssessmentStudy assessmentStudy);

    /**
     * 更改
     *
     * @param assessmentStudy
     * @return
     */
    boolean update(AssessmentStudy assessmentStudy);

    /**
     * 动态修改
     *
     * @param record
     * @return
     */
    boolean updateByPrimaryKeySelective(AssessmentStudy record);

    /**
     * 总数
     *
     * @param assessmentStudySearchVo
     * @return
     */
    Integer count(AssessmentStudySearchVo assessmentStudySearchVo);

    /**
     * 列表
     *
     * @param assessmentStudySearchVo
     * @return
     */
    List<AssessmentStudyVo> selectList(AssessmentStudySearchVo assessmentStudySearchVo);

    /**
     * 分页查询
     *
     * @param assessmentStudySearchVo
     * @return
     */
    Page<AssessmentStudyVo> selectPage(AssessmentStudySearchVo assessmentStudySearchVo);

    /**
     * 批量新增数据（MyBatis原生foreach方法）
     *
     * @param entities 实例对象列表
     * @return 影响行数
     */
    boolean insertBatch(List<AssessmentStudy> entities);

    /**
     * 根据学习模块查询考核列表
     *
     * @param studyId
     * @return
     */
    List<AssessmentListVo> selectAssessmentListByStudyId(Long studyId);

    /**
     * 查询出一个考核的关联学习资料名称
     *
     * @param assessmentId
     * @return
     */
    String selectStudyNamesByAssessmentId(Long assessmentId);
}